#include "AboutDialog.h"
#include "ui_AboutDialog.h"
#include <QFile>
#include <QMessageBox>

AboutDialog::AboutDialog(QWidget *parent) :
	QDialog(parent),
	ui(new Ui::AboutDialog)
{
	ui->setupUi(this);

	ui->label_version->setText(QString("Memorizer v. %1").arg(QApplication::applicationVersion()));
	ui->label_release->setText(QString("%1: %2  %3").arg(tr("Release date")).arg(BUILDDATE).arg(BUILDTIME));
	;
	ui->label_image->setPixmap(QPixmap(":/png/rsc/notepad_blue.png"));

	//ui->label_release->setToolTip(tr("Happy programmers' day!!!"));

	QFile history(":/txt/history.txt");
	history.open(QIODevice::ReadOnly);
	ui->textBrowser->setText(QString(history.readAll()));
	history.close();

	connect(ui->buttonBox,SIGNAL(accepted()),SLOT(close()));

}

AboutDialog::~AboutDialog()
{
	delete ui;
}
